import Vue from 'vue'
import Vuex from 'vuex'
import FastClick from 'fastclick'
import VueRouter from 'vue-router'
import App from './App'

// import { Button, Dialog, Icon, Form, Field } from 'vant';
// Vue.use(Button).use(Dialog).use(Icon).use(Form).use(Field);
import Vant from 'vant';
import 'vant/lib/index.css';
Vue.use(Vant);


import { Schedule } from 'vant-green';

Vue.use(Schedule);

import router from './router/index'
import './assets/css/font-awesome/css/font-awesome.min.css'
import './assets/css/weui/weui.css'
import './assets/css/common.less'
import './assets/css/form.css'
import "./assets/iconfont/iconfont.css"

import AbJwtSetting from './service/common/ab-jwt-setting'
import BaseService from './service/common/baseService'
import Tools from './service/common/tools'

import store from './store/index'
// import VConsole from 'vconsole';
// const vconsole = new VConsole()
import openFile from './components/xc/openFile.vue'
import xcOpinion from './components/xc/xc-opinion.vue'

import './assets/js/global.js'

import 'amfe-flexible/index.js'
// Vue.use(vconsole)
import Element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(Element)
import VueScroller from 'vue-scroller';
Vue.use(VueScroller);
import { LoadingPlugin, Marquee, MarqueeItem, ToastPlugin, AlertPlugin, GroupTitle, Cell, Grid, GridItem, XHeader, Popup, TransferDom, XSwitch, Tabbar, TabbarItem, Loading, Flexbox, FlexboxItem, XDialog, Divider, Card, Badge, Popover, ConfirmPlugin, Checker, CheckerItem } from 'vux'
Vue.use(LoadingPlugin)
Vue.use(AlertPlugin)
Vue.use(ToastPlugin)
Vue.use(ConfirmPlugin)
Vue.component('checker', Checker)
Vue.component('checker-item', CheckerItem)

Vue.component('x-header', XHeader)
Vue.component('grid', Grid)
Vue.component('grid-item', GridItem)
Vue.component('group-title', GroupTitle)
Vue.component('cell', Cell)
Vue.directive('transfer-dom', TransferDom)
Vue.component('x-switch', XSwitch)
Vue.component('tabbar', Tabbar)
Vue.component('tabbar-item', TabbarItem)

Vue.component('popup', Popup)
Vue.component('x-dialog', XDialog)

Vue.component('flexbox', Flexbox)
Vue.component('flexbox-item', FlexboxItem)
Vue.component('divider', Divider)
Vue.component('card', Card)
Vue.component('badge', Badge)
Vue.component('popover', Popover)

Vue.component('marquee', Marquee)
Vue.component('marqueeItem', MarqueeItem)

Vue.component('openFile', openFile)
Vue.component('xcOpinion', xcOpinion)

Vue.use(Vuex)
Vue.use(VueRouter)

Vue.use(AbJwtSetting)
// util 和baseService 直接注入到Vue上
Vue.use(Tools)
Vue.use(BaseService)
// seesion 过期弹框登录
import login from '@/view/login/login'
Vue.use(login)




FastClick.attach(document.body)

Vue.config.productionTip = false

/* eslint-disable no-new */
const app = new Vue({
  store,
  router,
  render: h => h(App)
}).$mount('#app-box')